/**
 * Created with CLion.
 * Description: 
 * User: loong
 * Date: 2025/4/24
 * Time: 22:56
 */

#ifndef PLAYER_H
#define PLAYER_H
#include "core/Actor.h"

class Effect;
class SpriteAnim;
class Player : public Actor
{
public:
    void Init() override;
    void Render() override;
    void Clean() override;
    void HandleEvent(SDL_Event & _event) override;
    void Update(float _dt) override;

    void KeyboardControl();

    void SyncCamera();

    void ChangeState(bool _moving);
    void CheckState();
    void CheckIsDead();
private:
    SpriteAnim * sprite_idle_ {nullptr};
    SpriteAnim * sprite_move_ {nullptr};
    Effect *     effect_ {nullptr};
    bool         is_moving_ {false};
};

#endif//PLAYER_H
